home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2008 February / PCWFEB08.iso / Software / Freeware / Miro 1.0 / Miro_Installer.exe / xulrunner / chrome / toolkit.jar / content / global / viewSource.xul < prev    next >
Encoding:
Extensible Markup Language  |  2005-09-20  |  10.3 KB  |  199 lines

  1. <?xml version="1.0"?>
  2.  
  3.  
  4. <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> 
  5. <?xml-stylesheet href="chrome://global/content/viewSource.css" type="text/css"?> 
  6. <?xml-stylesheet href="chrome://global/skin/findBar.css" type="text/css"?>
  7. <?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
  8. <?xul-overlay href="chrome://global/content/charsetOverlay.xul"?>
  9.  
  10. <!DOCTYPE window [
  11. <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
  12. %brandDTD;
  13. <!ENTITY % sourceDTD SYSTEM "chrome://global/locale/viewSource.dtd" >
  14. %sourceDTD;
  15. <!ENTITY % findBarDTD SYSTEM "chrome://global/locale/findbar.dtd" >
  16. %findBarDTD;
  17. ]>
  18.  
  19. <window id="viewSource"
  20.         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  21.         onload="onLoadViewSource();"
  22.         onunload="onUnloadViewSource();"
  23.         contenttitlesetting="true"
  24.         title="&mainWindow.title;" 
  25.         titlemodifier="&mainWindow.titlemodifier;" 
  26.         titlepreface="&mainWindow.preface;"
  27.         titlemenuseparator ="&mainWindow.titlemodifierseparator;"  
  28.         windowtype="navigator:view-source"
  29.         width="640" height="480"
  30.         screenX="10" screenY="10"
  31.         persist="screenX screenY width height sizemode">
  32.  
  33.   <script type="application/x-javascript" src="chrome://global/content/globalOverlay.js"/>
  34.   <script type="application/x-javascript" src="chrome://global/content/printUtils.js"/>
  35.   <script type="application/x-javascript" src="chrome://global/content/viewSource.js"/>
  36.   <script type="application/x-javascript" src="chrome://global/content/viewZoomOverlay.js"/>
  37.   <script type="application/x-javascript" src="chrome://communicator/content/contentAreaUtils.js"/>
  38.   <script type="application/x-javascript" src="chrome://communicator/content/utilityOverlay.js"/>
  39.   <script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/>
  40.   <script type="application/x-javascript" src="chrome://global/content/findBar.js"/>
  41.   <stringbundle id="bundle_findBar" src="chrome://global/locale/findbar.properties"/>
  42.   <stringbundle id="viewSourceBundle" src="chrome://global/locale/viewSource.properties"/>
  43.  
  44.   <command id="cmd_savePage" oncommand="ViewSourceSavePage();"/>
  45.   <command id="cmd_print" oncommand="PrintUtils.print();"/>
  46.   <command id="cmd_printpreview" oncommand="PrintUtils.printPreview(onEnterPP, onExitPP);"/>
  47.   <command id="cmd_pagesetup" oncommand="PrintUtils.showPageSetup();"/>
  48.   <command id="cmd_close" oncommand="window.close();"/>
  49.   <commandset id="editMenuCommands"/>
  50.   <command id="cmd_find" oncommand="onFindCmd();"/>
  51.   <command id="cmd_findAgain" oncommand="onFindAgainCmd();"/>
  52.   <command id="cmd_findPrevious" oncommand="onFindPreviousCmd();"/>    
  53.   <command id="cmd_reload" oncommand="ViewSourceReload();"/>
  54.   <command id="cmd_goToLine" oncommand="ViewSourceGoToLine();" disabled="true"/>
  55.   <command id="cmd_highlightSyntax" oncommand="highlightSyntax();"/>
  56.   <command id="cmd_wrapLongLines" oncommand="wrapLongLines()"/>
  57.   <command id="cmd_textZoomReduce" oncommand="ZoomManager.prototype.getInstance().reduce();"/>
  58.   <command id="cmd_textZoomEnlarge" oncommand="ZoomManager.prototype.getInstance().enlarge();"/>
  59.   <command id="cmd_textZoomReset" oncommand="ZoomManager.prototype.getInstance().reset();"/>
  60.  
  61.   <keyset id="editMenuKeys"/>
  62.   <keyset id="viewSourceKeys">
  63.     <key id="key_savePage" key="&savePageCmd.commandkey;" modifiers="accel" command="cmd_savePage"/>
  64.     <key id="key_print" key="&printCmd.commandkey;" modifiers="accel" command="cmd_print"/>
  65.     <key id="key_close" key="&closeCmd.commandkey;" modifiers="accel" command="cmd_close"/>
  66.     <key id="key_goToLine"     key="&goToLineCmd.commandkey;"  command="cmd_goToLine"  modifiers="accel"/>
  67.  
  68.     <key id="key_textZoomEnlarge" key="&textEnlarge.commandkey;" command="cmd_textZoomEnlarge" modifiers="accel"/>
  69.     <key id="key_textZoomEnlarge2" key="&textEnlarge.commandkey2;" command="cmd_textZoomEnlarge" modifiers="accel"/>
  70.     <key id="key_textZoomReduce"  key="&textReduce.commandkey;" command="cmd_textZoomReduce" modifiers="accel"/>
  71.     <key id="key_textZoomReset" key="&textReset.commandkey;" command="cmd_textZoomReset" modifiers="accel"/>
  72.  
  73.     <key id="key_reload" key="&reloadCmd.commandkey;" command="cmd_reload" modifiers="accel"/>
  74.     <key key="&reloadCmd.commandkey;" command="cmd_reload" modifiers="accel,shift"/>
  75.     <key keycode="VK_F5" command="cmd_reload"/>
  76.     <key keycode="VK_F5" command="cmd_reload" modifiers="accel"/>
  77.     <key id="key_find" key="&findOnCmd.commandkey;" command="cmd_find" modifiers="accel"/>
  78.     <key id="key_findAgain" key="&findAgainCmd.commandkey;" command="cmd_findAgain" modifiers="accel"/>
  79.     <key id="key_findPrevious" key="&findAgainCmd.commandkey;" command="cmd_findPrevious" modifiers="accel,shift"/>
  80.     <key keycode="&findAgainCmd.commandkey2;" command="cmd_findAgain"/>
  81.     <key keycode="&findAgainCmd.commandkey2;"  command="cmd_findPrevious" modifiers="shift"/>
  82.   </keyset>
  83.  
  84.   <popup id="viewSourceContextMenu">
  85.     <menuitem id="cMenu_findAgain"/>
  86.     <menuseparator/>
  87.     <menuitem id="cMenu_copy"/>
  88.     <menuseparator/>
  89.     <menuitem id="cMenu_selectAll"/>
  90.   </popup>
  91.  
  92.   <!-- Menu --> 
  93.   <toolbox id="viewSource-toolbox">
  94.     <menubar id="viewSource-main-menubar">
  95.  
  96.       <menu id="menu_file" label="&fileMenu.label;" accesskey="&fileMenu.accesskey;">
  97.         <menupopup id="filemenu-popup">
  98.           <menuitem key="key_savePage" command="cmd_savePage"
  99.                     label="&savePageCmd.label;" accesskey="&savePageCmd.accesskey;"/>
  100.           <menuitem command="cmd_pagesetup"
  101.                     label="&pageSetupCmd.label;" accesskey="&pageSetupCmd.accesskey;"/>
  102.           <menuitem command="cmd_printpreview"
  103.                     label="&printPreviewCmd.label;" accesskey="&printPreviewCmd.accesskey;"/>
  104.           <menuitem key="key_print" command="cmd_print"
  105.                     label="&printCmd.label;" accesskey="&printCmd.accesskey;"/>
  106.           <menuseparator/>
  107.           <menuitem key="key_close" command="cmd_close"
  108.                     label="&closeCmd.label;" accesskey="&closeCmd.accesskey;"/>
  109.         </menupopup>
  110.       </menu>
  111.  
  112.       <menu id="menu_edit">
  113.         <menupopup id="editmenu-popup">
  114.           <menuitem id="menu_undo"/>
  115.           <menuitem id="menu_redo"/>
  116.           <menuseparator/>
  117.           <menuitem id="menu_cut"/>
  118.           <menuitem id="menu_copy"/>
  119.           <menuitem id="menu_paste"/>
  120.           <menuitem id="menu_delete"/>
  121.           <menuseparator/>
  122.           <menuitem id="menu_selectAll"/>
  123.           <menuseparator/>
  124.           <menuitem id="menu_find"/>
  125.           <menuitem id="menu_findAgain"/>
  126.           <menuseparator/>
  127.           <menuitem id="menu_goToLine" key="key_goToLine" command="cmd_goToLine"
  128.                     label="&goToLineCmd.label;" accesskey="&goToLineCmd.accesskey;"/>
  129.         </menupopup>
  130.       </menu>
  131.  
  132.       <menu id="menu_view" label="&viewMenu.label;" accesskey="&viewMenu.accesskey;">
  133.         <menupopup id="viewmenu-popup">
  134.           <menuitem id="menu_reload" command="cmd_reload" accesskey="&reloadCmd.accesskey;"
  135.                     label="&reloadCmd.label;" key="key_reload"/>
  136.           <menuseparator />
  137.           <menu id="viewTextZoomMenu" label="&menu_textSize.label;" accesskey="&menu_textSize.accesskey;">
  138.             <menupopup>                    
  139.               <menuitem id="menu_textEnlarge" command="cmd_textZoomEnlarge" 
  140.                         label="&menu_textEnlarge.label;" accesskey="&menu_textEnlarge.accesskey;"
  141.                         key="key_textZoomEnlarge"/>
  142.               <menuitem id="menu_textReduce" command="cmd_textZoomReduce" 
  143.                         label="&menu_textReduce.label;" accesskey="&menu_textReduce.accesskey;"
  144.                         key="key_textZoomReduce"/>
  145.               <menuseparator/>
  146.               <menuitem id="menu_textReset" command="cmd_textZoomReset"
  147.                         label="&menu_textReset.label;" accesskey="&menu_textReset.accesskey;"
  148.                         key="key_textZoomReset"/>
  149.             </menupopup>
  150.           </menu>
  151.           <menu id="charsetMenu"/>
  152.           <menuseparator/>
  153.           <menuitem id="menu_wrapLongLines" type="checkbox" command="cmd_wrapLongLines"
  154.                     label="&menu_wrapLongLines.title;" accesskey="&menu_wrapLongLines.accesskey;"/>
  155.           <menuitem type="checkbox" id="menu_highlightSyntax" command="cmd_highlightSyntax"
  156.                     label="&menu_highlightSyntax.label;" accesskey="&menu_highlightSyntax.accesskey;"/>
  157.         </menupopup>
  158.       </menu>
  159.     </menubar>  
  160.   </toolbox>
  161.  
  162.   <vbox id="appcontent" flex="1"
  163.        ondragdrop="nsDragAndDrop.drop(event, contentAreaDNDObserver);">
  164.  
  165.     <browser id="content" type="content-primary" name="content" src="about:blank" flex="1"
  166.              context="viewSourceContextMenu"/>
  167.     <toolbar id="FindToolbar" hidden="true" align="center" fullscreentoolbar="true">
  168.       <toolbarbutton id="find-closebutton" tooltiptext="&findCloseButton.tooltip;"
  169.                      oncommand="closeFindBar();"/>
  170.  
  171.       <label control="find-field" value="&find.label;"/>
  172.       <hbox id="find-field-container">
  173.         <textbox id="find-field" oninput="find(this.value);"
  174.                 onkeypress="onFindBarKeyPress(event);" onblur="onFindBarBlur();"
  175.                 oncompositionstart="onFindBarCompositionStart(event);"
  176.                 oncompositionend="onFindBarCompositionEnd(event);"/>
  177.       </hbox>
  178.       <toolbarbutton id="find-next" label="&findNext.label;" tooltiptext="&findNext.tooltip;"
  179.                      command="cmd_findAgain" disabled="true" accesskey="&findNext.accesskey;"/>
  180.       <toolbarbutton id="find-previous" label="&findPrevious.label;" tooltiptext="&findPrevious.tooltip;"
  181.                      command="cmd_findPrevious" disabled="true" accesskey="&findPrevious.accesskey;"/>
  182.       <toolbarbutton id="highlight"
  183.                      label="&highlight.label;"
  184.                      tooltiptext="&highlight.tooltip;"
  185.                      oncommand="toggleHighlight(!this.checked);
  186.                                 if (gFindMode != FIND_NORMAL) setFindCloseTimeout();"
  187.                      type="checkbox" disabled="true"
  188.                      accesskey="&highlight.accesskey;"/>
  189.       <checkbox id="find-case-sensitive" oncommand="toggleCaseSensitivity(this.checked);"
  190.                 label="&caseSensitiveCheckbox.label;" accesskey="&caseSensitiveCheckbox.accesskey;"/>
  191.       <image id="find-status-icon"/>
  192.       <label id="find-status"/>
  193.     </toolbar>
  194.  
  195.  
  196.   </vbox> 
  197.  
  198. </window>
  199.